#include "stdafx.h"
#include "wf_blocksexplode.h"

#include "pf_modification.h"

/**
 * Constructor.
 */
WF_BlocksExplode::WF_BlocksExplode(PF_Container& container,
        PF_GraphicView& graphicView)
        :PF_PreviewActionInterface("Blocks Explode",
                           container, graphicView) {
}



WF_BlocksExplode::~WF_BlocksExplode() {}


QAction* WF_BlocksExplode::createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/) {
	// tr("Explode"),
    QAction* action = new QAction(tr("&Explode"), NULL);
	action->setIcon(QIcon(":/extui/modifyexplode.png"));
    //action->zetStatusTip(tr("Explode Blocks and other Entity Groups"));
    return action;
}


void WF_BlocksExplode::init(int status) {
    PF_PreviewActionInterface::init(status);

    trigger();
    finish();
}



void WF_BlocksExplode::trigger() {
    PF_Modification m(*container, graphicView);
    m.explode();
}


// EOF
